#include "/project/public/_public.h"
void EXIT(int sig)
{
	printf("sig=%d\n",sig);
	exit(0);
}
//exit()退出时只会析构全局变量,所以此处需要作为全局变量
CPActive active;
int main(int argc, char* argv[])
{
	if(argc < 2)
	{
		printf("Using:./book_simple procname timeout\n");
		return -1;
	}
	signal(2,EXIT);
	signal(15,EXIT);
	active.AddPInfo(atoi(argv[2]),argv[1]);

	while(true)
	{
		active.UptATime();
		sleep(10);
	}
	return 0;
}
